import type { ThemeState } from "./state";

export const getters = {
	// 是否是暗色模式
	isDarkMode: (state: ThemeState): boolean => {
		if (state.mode === "system") {
			return state.systemIsDark;
		}
		return state.mode === "dark";
	},

	// 当前主题的主色
	primaryColor: (state: ThemeState): string => {
		return state.variables.primaryColor;
	},

	// 当前主题的背景色
	backgroundColor: (state: ThemeState): string => {
		return state.variables.bgColor;
	},
};
